package com.md24housecall.model;

import android.os.Parcel;
import android.os.Parcelable;

public class TagItem implements Parcelable {

	public String _name;
	public String _description;
	public String _content;
	
	public TagItem() {
		_name = "";
		_description = "";
		_content = "";
	}
	
	/** Constructor with data from Parcel */
	public TagItem(Parcel in) {
		this._name = in.readString();
		this._description = in.readString();
		this._content = in.readString();
		
	}
	
	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(_name);
		dest.writeString(_description);
		dest.writeString(_content);
	}
	
	public static final Parcelable.Creator<TagItem> CREATOR = new Parcelable.Creator<TagItem>() {
		public TagItem createFromParcel(Parcel in) {
			return new TagItem(in); 
		}
		public TagItem[] newArray(int size) {
			return new TagItem[size];
		}
	};
	
	@Override
	public String toString() {
		return _name + ", " + _description + " @tags=" + _content;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}
}
